package cn.rc.rcsystem.feign;

import cn.rc.rcsystem.fallback.CarRentalServiceFallbackFactory;
import cn.rc.rcsystem.fallback.UserServiceFallbackFactory;
import cn.rc.rcsystem.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name="service-user",path = "/user",contextId = "carRentalService",fallbackFactory = CarRentalServiceFallbackFactory.class )
public interface CarRentalService {
    @RequestMapping(value = "/charter/{shopId}/{carNumber}",method = RequestMethod.POST)
    JSONResult charter(@PathVariable("shopId")Long shopId , @PathVariable("carNumber")String carNumber);
}
